var t = require;
var e = module;
var o = exports;
var a,
    i =
        (this && this.__extends) ||
        ((a = function (t, e) {
            return (a =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                })(t, e);
        }),
        function (t, e) {
            a(t, e);
            function o() {
                this.constructor = t;
            }
            t.prototype = null === e ? Object.create(e) : ((o.prototype = e.prototype), new o());
        }),
    n =
        (this && this.__decorate) ||
        function (t, e, o, a) {
            var i,
                n = arguments.length,
                r = n < 3 ? e : null === a ? (a = Object.getOwnPropertyDescriptor(e, o)) : a;
            if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, a);
            else
                for (var s = t.length - 1; s >= 0; s--)
                    (i = t[s]) && (r = (n < 3 ? i(r) : n > 3 ? i(e, o, r) : i(e, o)) || r);
            return n > 3 && r && Object.defineProperty(e, o, r), r;
        };
Object.defineProperty(o, "__esModule", {value: !0});
var r = t("SignBoxItem"),
    s = cc._decorator,
    c = s.ccclass,
    p = s.property,
    l =
        (s.menu,
        (function (t) {
            i(e, t);
            function e() {
                var e = (null !== t && t.apply(this, arguments)) || this;
                e.dayLable1 = null;
                e.dayLable2 = null;
                e.todayList = [];
                e.viewlist = [];
                e.dayIndex = 0;
                e.isViewToday = !1;
                return e;
            }
            e.prototype.setSignDayData = function (t, e, o) {
                this.dayIndex = t;
                for (var a = 0; a < this.todayList.length; a++) this.todayList[a].active = e;
                for (a = 0; a < this.viewlist.length; a++) this.viewlist[a].playScale(e);
                this.isViewToday = e;
                var i = "第" + (t + 1) + "天";
                if (e) {
                    this.dayLable1.string = i;
                    this.dayLable2.string = "";
                } else {
                    this.dayLable1.string = "";
                    this.dayLable2.string = i;
                }
                for (a = 0; a < this.viewlist.length; a++) {
                    this.viewlist[a].dayBtnIndex = a;
                    this.viewlist[a].dayIndex = t;
                    this.viewlist[a].viewNodeParent(o);
                }
            };
            e.prototype.getBoxKindKind = function (t) {
                return this.viewlist[t].isViewBoxKind;
            };
            e.prototype.checkIsRewardOver = function (t, e, o) {
                if (2 == this.viewlist.length) {
                    t ? this.viewlist[0].viewUnReward() : this.viewlist[0].viewReward();
                    e ? this.viewlist[1].viewUnReward() : this.viewlist[1].viewReward();
                    if (o) {
                        this.viewlist[0].node.opacity = 255;
                        this.viewlist[1].node.opacity = 255;
                    } else {
                        for (var a = 0; a < this.viewlist.length; a++) this.viewlist[a].playScale(!1);
                        this.viewlist[0].node.opacity = 100;
                        this.viewlist[1].node.opacity = 100;
                    }
                }
            };
            e.prototype.updataViewBox = function () {};
            n([p(cc.Label)], e.prototype, "dayLable1", void 0);
            n([p(cc.Label)], e.prototype, "dayLable2", void 0);
            n([p([cc.Node])], e.prototype, "todayList", void 0);
            n([p([r.default])], e.prototype, "viewlist", void 0);
            return n([c], e);
        })(cc.Component));
o.default = l;
